﻿CREATE TABLE [dbo].[ASMS_MaintenanceBill]
(
	[Id] uniqueidentifier NOT NULL PRIMARY KEY,
	[Number] nvarchar(64) NOT NULL,
	[BusinessId] uniqueidentifier NOT NULL,
	[StationId] uniqueidentifier NOT NULL,
	[BookingBillId] uniqueidentifier,
	[CustomerId] uniqueidentifier NOT NULL,
	[AutomobileId] uniqueidentifier NOT NULL,
	[SalesManagerId] uniqueidentifier,
	[EstimatedDeliveryDate] datetime,
	[OilMass] REAL,
	[RunningKilometers] REAL,
	[Memo] nvarchar(256),
	[VIN] nvarchar(64),
	[EIN] nvarchar(64),
	[NextMaintenanceDate] datetime,
	[NextAnnualSurveyDate] datetime,
	[InsuranceExpirationDate] datetime,
	[NextReplaceTireDate] datetime,
	[InsuranceCompany] nvarchar(32),
	[Amount] money,
	[DeliveryTime] datetime,
	[Status] int NOT NULL,
	[ServiceItemStatus] int,
	[MaterialStatus] int,
	[MaterialCount] int,
	[ServiceItemCount] int,
	[PayItemCount] int,
	[CreatedTime] datetime NOT NULL,
	[Creator] nvarchar(64) NOT NULL
)
